<template>
  <view class="box">
    <view class="detail">
      <view class="detail_title">
        <view class="detail_title_right">
          <u-icon
            name="/static/img/myUserManage/call.png"
            size="84rpx"
            v-if="dataList.type === 1"
          />
          <u-icon
            name="/static/img/myUserManage/email.png"
            size="84rpx"
            v-if="dataList.type === 2"
          />
          <u-icon
            name="/static/img/myUserManage/home.png"
            size="84rpx"
            v-if="dataList.type === 3"
          />
          <u-icon
            name="/static/img/myUserManage/wx.png"
            size="84rpx"
            v-if="dataList.type === 4"
          />
          <view class="">
            <u-text
              :text="dataList.servicer"
              bold
              size="36rpx"
              color="#333"
              margin="0 16rpx 0 20rpx"
            />
            <u-text
              :text="
                `服务时间：` +
                `${$u.timeFormat(dataList.serviceTime, 'yyyy-mm-dd')}`
              "
              bold
              size="28rpx"
              color="#666"
              margin="0 16rpx 0 20rpx"
            />
          </view>
        </view>
        <view class="btn">{{ statusMap[dataList.type] }}</view>
      </view>
    </view>
    <view class="content flex_wrap">
      <div style="max-width: 170rpx; min-width: 140rpx">
        <u--text text="服务内容：" color="#3D3D3D" size="28rpx" />
      </div>
      <div>
        <u--text :text="dataList.content" color="#3D3D3D" size="28rpx" />
      </div>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      statusMap: {
        1: "电话",
        2: "邮件",
        3: "上门",
        4: "微信",
      },
      status: "2",
      serviceTime: "",
      dataList: {},
    };
  },
  onLoad(options) {
    this.dataList = options?.data && JSON.parse(options?.data);
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.box {
  padding: 40rpx;
  background-color: #f5f8fe;
  height: 100vh;
}
.detail {
  width: 100%;
  padding: 40rpx 32rpx 40rpx 20rpx;
  box-sizing: border-box;
  border-radius: 20rpx 20rpx 0 0;
  background: #ffffff;

  &_title {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    &_right {
      display: flex;
      align-items: center;
    }
  }
  .btn {
    width: 140rpx;
    height: 58rpx;
    background: #eaf2ff;
    border-radius: 58rpx;
    font-size: 32rpx;
    color: #588bf3;
    text-align: center;
    line-height: 58rpx;
  }
}
.content {
  background: #e8f0ff;
  padding: 32rpx 14rpx 32rpx 20rpx;
}
</style>
